//
//  DiscountCollectionViewCell.m
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/7/1.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "DiscountCollectionViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation DiscountCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        self.backView = [[UIView alloc]initWithFrame:CGRectMake(WIDTH / 15, 10, WIDTH / 1.2, 240)];
        self.backView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.backView];
        [_backView release];
        
        self.disImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH / 1.2, 180)];
        //self.disImage.backgroundColor = [UIColor cyanColor];
        [self.backView addSubview:self.disImage];
        [_disImage release];
        
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 180, WIDTH / 1.2, 30)];
        //self.titleLabel.backgroundColor = [UIColor redColor];
        [self.backView addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.marketLabel =[[UILabel alloc]initWithFrame:CGRectMake(WIDTH / 5.4, 212, WIDTH / 6, 25)];
//        self.marketLabel.backgroundColor = [UIColor greenColor];
//        self.marketLabel.textAlignment =1;
        [self.backView addSubview:self.marketLabel];
        [_marketLabel release];
        
        self.markpriceLabel =[[UILabel alloc]initWithFrame:CGRectMake(0, 212, WIDTH / 5.3, 25)];
//        self.markpriceLabel.backgroundColor = [UIColor redColor];
        self.markpriceLabel.text =@"原价-> ￥";
        self.markpriceLabel.font = [UIFont systemFontOfSize:14];
        [self.backView addSubview:self.markpriceLabel];
        [_markpriceLabel release];
        
        self.nowpriceLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH / 2.1, 212, WIDTH / 5.3, 25)];
//        self.nowpriceLabel.backgroundColor = [UIColor blueColor];
        self.nowpriceLabel.text = @"现价-> ￥";
        self.nowpriceLabel.textColor = [UIColor redColor];
        [self.backView addSubview:self.nowpriceLabel];
        self.nowpriceLabel.font = [UIFont systemFontOfSize:14];
        [_nowpriceLabel release];
        
        self.disLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH / 1.5, 210, WIDTH / 6, 28)];
//        self.disLabel.backgroundColor = [UIColor purpleColor];
//        self.disLabel.textAlignment =1;
        [self.backView addSubview:self.disLabel];
        self.disLabel.textColor = [UIColor redColor];
        [_disLabel release];
        
        
    }
    return self;
}


- (void)layoutSubviews
{
    
    
    [super layoutSubviews];
    
}


@end
